const COMMON_MENU = [

]

const DEF_MENU = [
  // {
  //   type_id: 'scene',
  //   title: '场景',
  //   dis_title: "隐藏场景",
  //   act_title: "显示场景",
  //   icon: 'icon-scene_close',
  //   active_icon: 'icon-scene',
  //   isActive: false
  // },
  // {
  //   type_id: 'menu',
  //   title: '菜单',
  //   dis_title: "菜单",
  //   act_title: "菜单",
  //   icon: 'icon-menu',
  //   active_icon: 'icon-menu',
  //   isActive: false,
  //   display: true
  // },
  {
    type_id: 'gyro',
    title: '陀螺仪',
    dis_title: "关闭陀螺仪",
    act_title: "开启陀螺仪",
    icon: 'icon-gyro',
    active_icon: 'icon-gyro',
    isActive: false
  },
  {
    type_id: 'vr',
    title: 'V  R',
    dis_title: "开启VR",
    act_title: "关闭VR",
    icon: 'icon-vr-outline',
    active_icon: 'icon-vr-outline',
    isActive: false
  },
  {
    type_id: 'barrage',
    title: '弹幕',
    dis_title: "弹幕",
    act_title: "弹幕",
    icon: 'icon-danmu',
    active_icon: 'icon-danmu',
    isActive: false
  },
  {
    type_id: 'collect',
    title: '收藏',
    dis_title: "收藏",
    act_title: "收藏",
    icon: 'icon-heart',
    active_icon: 'icon-heart-red',
    isActive: false,
    display: true
  },
  {
    type_id: 'praise',
    title: '点赞',
    dis_title: "点赞",
    act_title: "点赞",
    icon: 'icon-dianzan',
    active_icon: 'icon-dianzan',
    isActive: false,
    display: true
  },
  {
    type_id: 'say',
    title: '说一说',
    dis_title: "发表说一说",
    act_title: "发表说一说",
    icon: 'icon-yuyin',
    active_icon: 'icon-yuyin',
    isActive: false
  },
  // {
  //   type_id: 'clean',
  //   title: '清屏',
  //   dis_title: "显示评论",
  //   act_title: "隐藏评论",
  //   icon: 'icon-eye_close',
  //   active_icon: 'icon-eye',
  //   isActive: false
  // },
  {
    type_id: 'share',
    title: '分享',
    dis_title: "分享",
    act_title: "分享",
    icon: 'icon-share',
    active_icon: 'icon-share',
    isActive: false
  },
  // {
  //   type_id: 'view',
  //   title: '视角',
  //   dis_title: "切换视角",
  //   act_title: "切换视角",
  //   icon: 'icon-view',
  //   active_icon: 'icon-view',
  //   isActive: false
  // },
  {
    type_id: 'bgmusic',
    title: '音乐',
    dis_title: "开启音乐",
    act_title: "关闭音乐",
    icon: 'icon-sound_close',
    active_icon: 'icon-sound',
    isActive: false
  },
  // {
  //   type_id: 'rotate',
  //   title: '旋转',
  //   dis_title: "开启旋转",
  //   act_title: "停止旋转",
  //   icon: 'icon-720',
  //   active_icon: 'icon-720',
  //   isActive: false
  // },
  // {
  //   type_id: 'interaction',
  //   title: 'interaction',
  //   dis_title: "同屏互动",
  //   act_title: "同屏互动",
  //   icon: 'icon-gerenzhongxin-hudongfangke-',
  //   active_icon: 'icon-gerenzhongxin-hudongfangke-',
  //   isActive: false,
  // },
]

const PC_DEF_MENU = [
  {
    type_id: 'scene',
    title: '场景',
    dis_title: "隐藏场景",
    act_title: "显示场景",
    icon: 'icon-scene_close',
    active_icon: 'icon-scene',
    isActive: false
  },
  {
    type_id: 'vr',
    title: 'V  R',
    dis_title: "开启VR",
    act_title: "关闭VR",
    icon: 'icon-vr-outline',
    active_icon: 'icon-vr-outline',
    isActive: false
  },
  {
    type_id: 'barrage',
    title: '弹幕',
    dis_title: "弹幕",
    act_title: "弹幕",
    icon: 'icon-danmu',
    active_icon: 'icon-danmu',
    isActive: false
  },
  {
    type_id: 'collect',
    title: '收藏',
    dis_title: "收藏",
    act_title: "收藏",
    icon: 'icon-heart',
    active_icon: 'icon-heart-red',
    isActive: false,
    display: true
  },
  {
    type_id: 'praise',
    title: '点赞',
    dis_title: "点赞",
    act_title: "点赞",
    icon: 'icon-dianzan',
    active_icon: 'icon-dianzan',
    isActive: false,
    display: true
  },
  {
    type_id: 'say',
    title: '说一说',
    dis_title: "发表说一说",
    act_title: "发表说一说",
    icon: 'icon-yuyin',
    active_icon: 'icon-yuyin',
    isActive: false
  },
  {
    type_id: 'share',
    title: '分享',
    dis_title: "分享",
    act_title: "分享",
    icon: 'icon-share',
    active_icon: 'icon-share',
    isActive: false
  },
  {
    type_id: 'bgmusic',
    title: '音乐',
    dis_title: "开启音乐",
    act_title: "关闭音乐",
    icon: 'icon-sound_close',
    active_icon: 'icon-sound',
    isActive: false
  },
]

// e模板toolsbar
const TOOLS_BAR_MENU_E = [
  {
    type_id: 'clean',
    title: 'clean',
    dis_title: "隐藏评论",
    act_title: "显示评论",
    icon: 'icon-biyan',
    active_icon: 'icon-zhengyan',
    isActive: false,
    display: true
  },
  {
    type_id: 'minimap',
    title: 'minimap',
    dis_title: "隐藏地图",
    act_title: "显示地图",
    icon: 'icon-ditu1',
    active_icon: 'icon-ditu1',
    isActive: false,
    display: true
  },
  {
    type_id: 'praise',
    title: 'praise',
    dis_title: "点赞",
    act_title: "点赞",
    icon: 'icon-dianzan',
    active_icon: 'icon-dianzan',
    isActive: false,
    display: true
  },
  {
    type_id: 'collect',
    title: 'collect',
    dis_title: "收藏",
    act_title: "收藏",
    icon: 'icon-heart',
    active_icon: 'icon-heart-red',
    isActive: false,
    display: true
  },
  {
    type_id: 'bgmusic',
    title: 'bgmusic',
    dis_title: "音乐",
    act_title: "音乐",
    icon: 'icon-jingyin',
    active_icon: 'icon-music1',
    isActive: false,
    display: true
  },
  {
    type_id: 'sayE',
    title: 'say',
    dis_title: "说一说",
    act_title: "说一说",
    icon: 'icon-suoyoupinlun',
    active_icon: 'icon-suoyoupinlun',
    isActive: true,
    display: true
  },
  {
    type_id: 'rotate',
    title: 'rotate',
    dis_title: "旋转",
    act_title: "旋转",
    icon: 'icon-buxuanzhuan',
    active_icon: 'icon-xuanzhuan-',
    isActive: false,
    display: true
  },
  {
    type_id: 'share',
    title: 'share',
    dis_title: "分享",
    act_title: "分享",
    icon: 'icon-share',
    active_icon: 'icon-share',
    isActive: false,
    display: true
  },
  {
    type_id: 'barrage',
    title: 'barrage',
    dis_title: "弹幕",
    act_title: "弹幕",
    icon: 'icon-danmu2',
    active_icon: 'icon-danmu11',
    isActive: false,
    display: true
  },
  {
    type_id: 'vr',
    title: 'V  R',
    dis_title: "开启VR",
    act_title: "关闭VR",
    icon: 'icon-vr-outline',
    active_icon: 'icon-vr-outline',
    isActive: false,
    display: true
  },
  {
    type_id: 'interaction',
    title: 'interaction',
    dis_title: "同屏互动",
    act_title: "同屏互动",
    icon: 'icon-gerenzhongxin-hudongfangke-',
    active_icon: 'icon-gerenzhongxin-hudongfangke-',
    isActive: false,
    display: true
  },
]

const FOOT_MID_MENU_E =  [
  {
    name: '作品集',
    title: 'works',
    icon: 'icon-tupian',
    image: '/static/images/works.png',
    isActive: false
  },
  {
    name: '场景',
    title: 'scene',
    icon: 'icon-changjing',
    image: '/static/images/scene.png',
    isActive: true
  },
  {
    name: '一键导览',
    title: 'navguide',
    icon: 'icon-daohang',
    image: '/static/images/nav_guide.png',
    isActive: false
  },
]

const FOOT_RIGHT_MENU_E = [
  // {
  //   title: 'settings',
  //   dis_title: "设置",
  //   act_title: "设置",
  //   icon: 'icon-shezhi',
  //   active_icon: 'icon-shezhi',
  //   isActive: false
  // },
  {
    title: 'usercenter',
    dis_title: "用户中心",
    act_title: "用户中心",
    icon: 'icon-user',
    active_icon: 'icon-user',
    isActive: false
  }
]

const BOTTOM_MENU_E = [
  {
    title: 'link',
    dis_title: "链接",
    act_title: "链接",
    icon: 'icon-lianjie1',
    active_icon: 'icon-lianjie1',
    isActive: false
  },
  {
    title: 'article',
    dis_title: "文章",
    act_title: "文章",
    icon: 'icon-tuwen',
    active_icon: 'icon-tuwen',
    isActive: false
  },
  {
    title: 'map',
    dis_title: "地图",
    act_title: "地图",
    icon: 'icon-ditu1',
    active_icon: 'icon-ditu1',
    isActive: false
  },
  {
    title: 'tel',
    dis_title: "联系电话",
    act_title: "联系电话",
    icon: 'icon-dianhua',
    active_icon: 'icon-dianhua',
    isActive: false
  }
]

// 原来旧模板toolsbar
const TOOLS_BAR_MENU = [
  {
    type_id: 1001,
    title: 'navmenu',
    dis_title: "导航菜单",
    act_title: "导航菜单",
    icon: 'icon-top-menu',
    active_icon: 'icon-top-menu',
    isActive: false,
    display: true
  },
  {
    type_id: 1002,
    title: 'usercenter',
    dis_title: "用户中心",
    act_title: "用户中心",
    icon: 'icon-user',
    active_icon: 'icon-user',
    isActive: false,
    display: true
  },
  {
    type_id: 1003,
    title: 'minimap',
    dis_title: "小地图",
    act_title: "小地图",
    icon: 'icon-ditu1',
    active_icon: 'icon-ditu1',
    isActive: false,
    display: true
  },
  {
    type_id: 1004,
    title: 'navguide',
    dis_title: "一键导览",
    act_title: "一键导览",
    icon: 'icon-daohang',
    active_icon: 'icon-pause',
    isActive: false,
    display: true
  },
  {
    type_id: 1005,
    title: 'works',
    dis_title: "所有作品",
    act_title: "所有作品",
    icon: 'icon-scenes',
    active_icon: 'icon-scenes',
    isActive: true,
    display: true
  },
  // {
  //   type_id: 1006,
  //   title: 'interaction',
  //   dis_title: "同屏互动",
  //   act_title: "同屏互动",
  //   icon: 'icon-gerenzhongxin-hudongfangke-',
  //   active_icon: 'icon-gerenzhongxin-hudongfangke-',
  //   isActive: false,
  //   display: true
  // },
  {
    type_id: 'interaction',
    title: 'interaction',
    dis_title: "同屏互动",
    act_title: "同屏互动",
    icon: 'icon-gerenzhongxin-hudongfangke-',
    active_icon: 'icon-gerenzhongxin-hudongfangke-',
    isActive: false,
    display: true
  },
  {
    type_id: 'clean',
    title: 'clean',
    dis_title: "显示评论",
    act_title: "隐藏评论",
    icon: 'icon-eye_close',
    active_icon: 'icon-eye',
    isActive: true,
    display: true
  },
  {
    type_id: 'rotate',
    title: 'rotate',
    dis_title: "开启旋转",
    act_title: "停止旋转",
    icon: 'icon-720',
    active_icon: 'icon-720',
    isActive: false,
    display: true
  },
  {
    type_id: 'view',
    title: 'view',
    dis_title: "切换视角",
    act_title: "切换视角",
    icon: 'icon-view',
    active_icon: 'icon-view',
    isActive: false,
    display: true
  },
]

const PERSPECTIVE_MENU = [
  {
    title: '正常视角',
    type: 'cm_normal_view'
  },
  {
    title: '球体视角',
    type: 'skin_view_ball'
  },
  {
    title: '小行星视角',
    type: 'cm_littleplanet_view'
  },
  {
    title: '超小视角',
    type: 'cm_pannini_view'
  },
  {
    title: '建筑视角',
    type: 'cm_architectural_view'
  },
  {
    title: '立体视角',
    type: 'cm_stereographic_view'
  },
  {
    title: '鱼眼视角',
    type: 'cm_fisheye_view'
  },
]

const ANIMATE_MAP = [
  [],
  [
    {id: 1, image: $globalconfig.URLS.API + 'krpano/images/clouds/1.png'},
    {id: 2, image: $globalconfig.URLS.API + 'krpano/images/clouds/2.png'},
    {id: 3, image: $globalconfig.URLS.API + 'krpano/images/clouds/3.png'},
    {id: 4, image: $globalconfig.URLS.API + 'krpano/images/clouds/4.png'},
    {id: 5, image: $globalconfig.URLS.API + 'krpano/images/clouds/5.png'}
  ]
]

// VR旅游导览图（旧总览图）标注图标的数量
const OVERVIEW_MARK_TYPE = {
  imgs: {
    1: 'static/images/mark/mark1.png',
    2: 'static/images/mark/mark2.png',
    3: 'static/images/mark/mark3.png',
    4: 'static/images/mark/mark4.png',
    5: 'static/images/mark/mark5.png',
    6: 'static/images/mark/mark6.png',
    7: 'static/images/mark/mark7.png',
    8: 'static/images/mark/mark8.png',
    9: 'static/images/mark/mark9.png',
    10: 'static/images/mark/mark10.png',
    11: 'static/images/mark/mark11.png',
    12: 'static/images/mark/mark12.png',
    13: 'static/images/mark/mark13.png',
    14: 'static/images/mark/mark14.png',
    15: 'static/images/mark/mark15.png',
    16: 'static/images/mark/mark16.png',
    17: 'static/images/mark/mark17.png',
    18: 'static/images/mark/mark18.png',
    19: 'static/images/mark/mark19.png',
    20: 'static/images/mark/mark20.png',
    22: 'static/images/mark/mark22.png',
  },
  effect: [
    '',
    'bounce', // 弹跳
    'flash', // 闪烁
    'pulse', // 呼吸
    'rubberBand' // 心跳
  ]
}

const menuTypeMap = {
  isonsmallscene: 'scene',
  showgyro: 'gyro',
  showvr: 'vr',
  isonsay: 'say',
  showfx: 'share',
  showclear: 'clean',
  showbarrage: 'barrage',
  ispraise: 'praise',
  isfabulous: 'praise',
  iscollect: 'collect',
  isrotate: 'rotate',
  isvisualangle: 'view',
  ismultiscreen: 'interaction',
  isonautoturn: 'rotate',
  ispcmusic: 'bgmusic',
  isbgmusic: 'bgmusic'
}

// 热点类型id
const hotspotType = {
  // 内嵌
  textIn: 14, // 内嵌文字
  imageIn: 7, // 内嵌图片
  videoIn: 22, // 内嵌视频
  // 非内嵌
  roam: 1, // 漫游
  link: 3, // 链接
  article: 6, // 图文
  audio: 8, // 音乐
  video: 9, // 视频
  mark: 16, // 标记（内嵌热点）
  image: 12, // 幻灯片
  three: 5, // 360环物
  ar: 13, // ar
  multifunction: 18, // 多功能
  plugin: 10, // 插件
  product: 11, // 在线商城
  red: 15, // 红包
  transitionvideo: 17, // 过场视频
  aerial: 19, // 航拍热点(templatetype=11特有)
  picture: 20, // 图片热点(日丰定制)
  // directory = 21, // 江西蓝玖科技有限公司(D845定制,文件目录)
}

// 菜单类型id
// 链接 = 1, 图文 = 2, 地图 = 3, 电话 = 4, 音频 = 8, 商品 = 12, 幻灯片 = 17, 视频 = 18, 多功能 = 19
const menuType = {
  link: 1, // 链接
  article: 2, // 图文
  map: 3, // 地图
  tel: 4, // 电话
  audio: 8, // 音频
  video: 18, // 视频
  image: 17, // 幻灯片
  goods: 12, // 商品
  multifunction: 19, // 多功能
  plugin: 10, // 插件
  scenic: 20, // 关联景区
  three: 21, // 360环物
}

export default {
  errno: 100,
  pageSize: 10,
  defMenu: DEF_MENU,
  pcDefMenu: PC_DEF_MENU,
  animateMap: ANIMATE_MAP,
  ovvMarkType: OVERVIEW_MARK_TYPE,
  toolsBarMenu: TOOLS_BAR_MENU,
  toolsBarMenuE: TOOLS_BAR_MENU_E, // 模板e菜单
  footMidMenuE: FOOT_MID_MENU_E, // 模板e底部中间菜单
  footRightMenuE: FOOT_RIGHT_MENU_E, // 模板e底部右侧自定义底部菜单
  bottomMenuE: BOTTOM_MENU_E, // mobile模板e底部自定义底部菜单
  perspectiveMenu: PERSPECTIVE_MENU,
  socketUrl: 'ws://120.27.141.41:50000',
  weatherCfg: {
    key: 'UC1B4FEB6E',
    secret: 'iqjcyrcg2dwfvy3o'
  },
  menuTypeMap: menuTypeMap,
  hotspotType: hotspotType,
  menuType: menuType,
}
